package com.magi.core;

import com.magi.exception.TypeMappingNotFoundException;

public interface IDatabaseTypeMapping {
    /**
     * Get the java type mapped to the database column type.
     * @param columnType Database column type.
     * @return Java type name.
     * @throws TypeMappingNotFoundException Throw if no mapping for the database column type.
     */
    String getJavaType(String columnType) throws TypeMappingNotFoundException;

    /**
     * According java type to get needed package of the type, return null if not need to import package.
     * @param javaType Java type.
     * @return Needed package name.
     */
    String getJavaTypePackage(String javaType);
}
